#!/bin/bash

case "$1" in
    configure)

        /usr/share/zentyal/initial-setup --no-restart openchange $2

        # restart module
        service zentyal openchange restart || true

        dpkg-trigger --no-await zentyal-core
    ;;
    triggered)
        case "$2" in
            "/usr/sbin/sogod")
                # Triggered when sogo package upgrade, restart module
                service zentyal openchange restart || true
            ;;
        esac
    ;;
esac

exit 0
